<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="kr.cadis.clms.dao.AbsenceDao, kr.cadis.clms.model.Absence, java.util.List" %>    
<%
	AbsenceDao absenceDao = new AbsenceDao();
	int noPerson = Integer.parseInt(request.getParameter("noPerson"));
	List<Absence> absences = absenceDao.selectByNoPerson(noPerson);
%>    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<table border="1">
	<tr><th>일련번호</th><th>사원번호</th><th>출발일</th><th>도착일</th><th>수정</th><th>삭제</th></tr>
<% 
		for(Absence absence : absences) {
%>
	<tr>
		<td><%= absence.getNo() %></td>
		<td><%= absence.getNoPerson() %></td>
		<td><%= absence.getStartDate() %></td>
		<td><%= absence.getFinishDate() %></td>
		<td><a href="Update.jsp?no=<%= absence.getNo() %>">수정</a></td>
		<td><a href="Delete.jsp?no=<%= absence.getNo() %>">삭제</a></td>
	</tr>
<%
		}
%>
</table>
<br />
<a href="Insert.jsp?noPerson=<%= noPerson %>">추가하기</a><br />
<a href="/CLMSWeb/JSP/Person/List.jsp">회원관리 폼으로 돌아가기</a>
</body>
</html>